<!DOCTYPE html>
<html lang='en'>

<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title></title>
  <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
  <div id='app'>
    <div>
      <son :msg="msg"></son>
    </div>
  </div>
  <script type='text/javascript'>
    var son = {
      data() {
        return {
          msg2: '这是子元素'
        }
      },
      methods: {

      },
      template: `<div>{{msg2}} ============ {{ msg}} </div>`,
      props: ['msg']
    }
    var vm = new Vue({
      el: '#app',
      data: {
        msg: '这是父元素的值'
      },
      methods: {

      },
      components: {
        son
      }
    });
  </script>
</body>

</html>